package day03;

public class IfElseIfDemo {
    public static void main(String[] args) {
        //成绩在60以下不合格，在60~80之间是良，在80~100成绩优秀
/*
        int score =55;
        if (score<60){
            System.out.println("成绩为"+score+",成绩不合格");
        } else if (score>=60 && score<=80) {
            System.out.println("成绩为："+score+",成绩合格");
        }else {
            System.out.println("成绩为："+score+",成绩优秀");
        }


 */

        //消费满500打9折，满800打8折；满1000打6.5折;满2000打五折
        double price=200;
        if (price>=500 && price<800){
            price *=0.9;
        }else if (price>=800 && price<1000){
            price *=0.8;
        } else if (price>=1000 && price<2000) {
            price *=0.65;
        }else if (price>=2000){
            price *=0.5;
        }
            System.out.println("你的消费金额为"+price);




        /*
        double price =300.0;
        if (price>=2000){
          price *=0.5;
        }else if (price>=1000){
            price *=0.7;
        }else if (price>=500){
            price *=0.8;
        }else {
            price *=0.9;
        }
        System.out.println("最终的金额为："+price);


         */
    }
}